def input_password():
    password=input("请输入密码")
    assert len(password)>=8,'此处发生了什么异常'
    return  password

try:
    password=input_password()
    print(password)
except Exception as e:
    print(e)